package com.example.hms.controller;

import com.example.hms.entity.BlackList;
import com.example.hms.service.BlackListService;
import com.example.hms.util.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

@RestController
@RequestMapping("/blackList")
public class BlackListController {
    @Resource
    private BlackListService blackListService;

    @RequestMapping(value = "selectAllBlackList", method = RequestMethod.GET)
    public Result selectAllBlackList(String  blackListId,String customerId,String state) {
        return blackListService.selectAllBlackList(blackListId,  customerId, state);
    }

    @RequestMapping(value = "insert", method = RequestMethod.GET)
    public Result insert(BlackList blackList,  HttpServletRequest request) {
        return blackListService.insert(blackList,request);
    }

    @RequestMapping(value = "update", method = RequestMethod.GET)
    public Result update(BlackList blackList, HttpServletRequest request) {
        return blackListService.update(blackList, request);
    }

    @RequestMapping(value = "delete", method = RequestMethod.GET)
    public Result delete(BlackList blackList, HttpServletRequest request) {
        return blackListService.delete(blackList, request);
    }
}
